import { Pipe, PipeTransform } from '@angular/core';
import { ToolService } from '../service/tool.service';

@Pipe({
  name: 'empty'
})
export class EmptyPipe implements PipeTransform {

  transform(value: any, args?: any): any {
    if(value instanceof Array){
        if(value.length>0){
            return false;
        }else{
           return true;
        }
    }else{
      return ToolService.isEmpty(value);
    }
    
  }

}
